using System;
using System.Collections.Generic;
using System.Text;

namespace ExchangeHog.Pop3Client.Responses
{
	internal sealed class RetrResponse : Pop3Response
	{
		public string[] MessageLines { get; private set; }
		public long Octets { get; private set; }

		public RetrResponse(Pop3Response response, string[] messageLines)
			: base(response.ResponseContents, response.HostMessage, response.StatusIndicator)
		{
			if (messageLines == null)
				throw new ArgumentNullException("messageLines");

			string[] values = response.HostMessage.Split(' ');
			if (values.Length == 2)
				Octets = Convert.ToInt64(values[1]);

			MessageLines = messageLines;
		}
	}
}
